package com.Trainer.DifficultInterface;

import javax.swing.*;
import java.awt.*;

public class SelDifficultInterface extends JPanel {
    JLabel titleLabel = new JLabel("选择测验难度");
    JLabel easyLabel = new JLabel("在420秒内完成20道题目！");
    JLabel middleLabel = new JLabel("在300秒内完成20道题目！");
    JLabel diffLabel = new JLabel("在180秒内完成20道题目！");
    JButton easyButton = new JButton("简单");
    JButton middleButton = new JButton("一般");
    JButton diffButton = new JButton("困难");
    JButton returnButton = new JButton("返回");

    public SelDifficultInterface(int width, int height){
        setLayout(null);
        setBounds(0,0,width,height);

        titleLabel.setHorizontalAlignment(SwingConstants.CENTER);
        titleLabel.setFont(new Font("微软雅黑",Font.PLAIN,32));
        titleLabel.setBounds(0,0,900,100);
        titleLabel.setOpaque(true);
        add(titleLabel);

        easyButton.setBounds(170,130,150,50);
        easyButton.setFont(new Font("微软雅黑",Font.PLAIN,28));
        easyLabel.setBounds(420,140,400,30);
        easyLabel.setFont(new Font("微软雅黑",Font.PLAIN,25));
        add(easyButton);
        add(easyLabel);

        middleButton.setBounds(170,230,150,50);
        middleButton.setFont(new Font("微软雅黑",Font.PLAIN,28));
        middleLabel.setBounds(420,240,400,30);
        middleLabel.setFont(new Font("微软雅黑",Font.PLAIN,25));
        add(middleButton);
        add(middleLabel);

        diffButton.setBounds(170,330,150,50);
        diffButton.setFont(new Font("微软雅黑",Font.PLAIN,28));
        diffLabel.setBounds(420,340,400,30);
        diffLabel.setFont(new Font("微软雅黑",Font.PLAIN,25));
        add(diffButton);
        add(diffLabel);

        returnButton.setBounds(360,430,150,50);
        returnButton.setFont(new Font("微软雅黑",Font.PLAIN,28));
        add(returnButton);
        add(returnButton);
        add(returnButton);
    }

    public JButton getEasyButton() {
        return easyButton;
    }

    public JButton getMiddleButton() {
        return middleButton;
    }

    public JButton getDiffButton() {
        return diffButton;
    }

    public JButton getReturnButton() {
        return returnButton;
    }
}
